package net.chasing.androidbaseconfig.widget.edittext;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

import androidx.appcompat.widget.AppCompatEditText;

/**
 * 解决与NestedScrollView嵌套时，多行滑动冲突的问题
 */
public class CanScrollEditText extends AppCompatEditText {
    public CanScrollEditText(Context context) {
        super(context);
    }

    public CanScrollEditText(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public boolean onTouchEvent(MotionEvent ev) {

        getParent().requestDisallowInterceptTouchEvent(true);

        return super.onTouchEvent(ev);

    }


}
